/*
 * Switch Class
 * 
 * Represents a switch on the track
 * 
 */
package Track.Track;

import Track.Block;

/**
 *
 * @author Chris
 */
public class Switch {
    
    protected int id;
    protected int fixed;
    protected int connected;
    protected int open;
    protected int line;
    protected int state;
    
    //Two boolean values that affect the logic of the switch
    //Switch connected pieces of track involved in looping
    protected boolean loopSwitch;
    //the fixedBlock's .next values makes a connection with a closed block
    protected boolean nextConnect;
    
    public Switch(int idVal, int fixedEnd, int connectedEnd, int openEnd, int switchLine, boolean loop, boolean next){
        fixed = fixedEnd;
        connected = connectedEnd;
        open = openEnd;
        line = switchLine;
        state = 0;
        loopSwitch = loop;
        nextConnect = next;
        id = idVal;
    }
    

    
    
    
}
